home *** CD-ROM | disk | FTP | other *** search
- Path: news.iag.net!news
- From: jatmon@iag.net (John R Buchan)
- Newsgroups: comp.lang.c,comp.os.os2.programmer.misc
- Subject: Re: redefining stdout and stderr
- Date: 10 Jan 1996 13:24:27 GMT
- Organization: Internet Access Group, Orlando, Florida
- Message-ID: <4d0emb$7aq@news.iag.net>
- References: <DKw9Cv.2x4@fyi.net> <4ctfij$77o@baloo.pipex-sa.net>
- NNTP-Posting-Host: pm1-orl23.iag.net
- X-Newsreader: WinVN 0.99.7
-
- In article <4ctfij$77o@baloo.pipex-sa.net>, thierry@solo.pipex.co.za says...
- >
- >In <DKw9Cv.2x4@fyi.net>, fireresq@fyi.net writes:
- >>everyting I am doing is running on OS/2 Warp Connect and using the IBM
- >>Set++ compiler.
- >>
- >>I have a program that I have converted form an exe to a DLL. I used many
- >>printf's for debug and status information.
- >>
- >>What I want to do is cause stdout and stderr to go to a file but since
- >>this dll will be called from VisualAge I cannot redirect the output with >.
- >>
- >[...]
- >>Thanks in advance!
- >>Mark Russell.
- >
- >Close the handles 1 and 2 (stdout and stderr) then open your file.
- >Use DosDupHandle (or the lib equivalent) to get your redirection.
-
- Why not just use the ansi reopen function?
-
- From the c.l.c faq (Frequently Asked Question) list (available for
- anonymous ftp from rtfm.mit.edu /pub/usenet/comp.lang.c):
-
- 12.33: How can I redirect stdin or stdout to a file from within a
- program?
-
- A: Use freopen() (but see question 12.34 below).
-
-
- --
- John R Buchan -:|:- Looking for that elusive FAQ? ftp to:
- jatmon@mail.iag.net -:|:- rtfm.mit.edu /pub/usenet-by-group/....
-
-